body, html * {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

body {
    background: #303030;
}

.code, .code * {
    font-family: "DejaVu Sans Mono", monospace;
}

h1 {
    font-size: 3em;
    color: #40C0FF;
    margin: 14px 0;
    padding: 40px 16px 20px;
    border-bottom: 2px dashed grey;
    min-height: 60px;
}

h1 em {
    color: #BBE0E0;
    font-size: small;
    padding-left: 2em;
    font-style: normal;
    font-weight: normal;
    display: inline-block;
}

.input-container, .error-box {
    margin: 8px 16px;
}

.regex-input {
    background: #EEE;
    font-size: 1.2em;
    line-height: 1.4em;
    color: #333;
    border: 1px solid black;
    padding: 4px;
    font-weight: bold;
    word-break: break-all;
    word-wrap: break-word;
}

.regex-input table {
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.regex-input .input {
    color: #3030C0;
    padding: 0 2px;
    border: none;
    background: #EEE;
    font-size: 1.2em;
    line-height: 1.4em;
    height: 1.4em;
    font-weight: bold;
    word-break: break-all;
    word-wrap: break-word;
    margin: 0;
    width: auto;
}

.regex-input .input {
    display: table;
    width: 100%;
}

.flag-label {
    color: white;
    cursor: pointer;
    display: inline-block;
}

.flag-label input {
    margin-right: 4px;
}

.error-box {
    background: #EEE;
    font-size: 1.2em;
    line-height: 1.4em;
    border: 1px solid black;
    padding: 4px;
    color: darkred;
    white-space: pre;
    word-wrap: normal;
    word-break: keep-all;
    overflow: auto;
}

.btn {
    font-size: 16px;
    line-height: 16px;
    display: inline-block;
    margin: 10px 10px 10px 0;
    padding: 12px 12px 10px;
    color: #EEF;
    border: none;
    cursor: pointer;
    background: #40B0EF linear-gradient(to bottom, #40B0EF, #3060A0);
    border-radius: 12px;
    text-decoration: none;
}

.btn:hover {
    color: #FEF;
    background: #3CB0FD linear-gradient(to bottom, #3CB0FD, #3498DF);
    text-decoration: none;
}

.graph-container {
    padding: 4px;
    margin: 0px 16px;
    border: 1px solid black;
    background: #EEE;
    overflow: auto;
    cursor: move;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.graph-container svg {
    display: block;
    margin: 0 auto;
}

footer div.normal {
    text-align: center;
    border-top: 1px solid grey;
    margin: 1em auto;
    padding: 10px;
    font-size: 1.2em;
}

footer, footer a {
    color: #EEF;
}

footer div.embed {
    display: none;
}

body.embed {
    background: #EEE;
}

body.embed, body.embed .graph-container {
    margin: 0;
    padding: 0;
    border: none;
}

body.embed h1,
body.embed .input-container,
body.embed #github {
    display: none !important;
}

body.embed footer div.normal {
    display: none;
}

body.embed footer div.embed {
    display: block;
}

body.embed footer div.embed, body.embed div.footer a {
    color: white;
    font-size: 14px;
}

body.embed footer {
    display: block;
    width: auto;
    margin: 0;
    padding: 2px 10px;
    background: rgb(75, 0, 130);
    opacity: 0.85;
    position: fixed;
    right: 0;
    bottom: 0;
}

body.embed {
    height: 100%;
}

body.embed .graph-container {
    height: 100vh;
}

.export-canvas {
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
}